package intelligentcity.cities;

import intelligentcity.conf.Conf;
import intelligentcity.model.CityBuilder;
import intelligentcity.model.intersections.Intersection;
import intelligentcity.model.streets.HorizontalStreet;
import intelligentcity.model.streets.VerticalStreet;
import intelligentcity.model.turns.Turn;
import intelligentcity.model.turns.Turn.Corner;
import intelligentcity.system.EstablishedLights;

public class WashingtonCityBuilder extends CityBuilder {

    public WashingtonCityBuilder() {
        super();

        leftBorderOfTraffic = 1;
        rightBorderOfTraffic = 799;
        upperBorderOfTraffic = 1;
        lowerBorderOfTraffic = 799;

        addStreet(new HorizontalStreet(0, 200, 300));
        Intersection int1 = new Intersection(new VerticalStreet(380, 170, 270), new HorizontalStreet(300, 200, 500));
        addIntersection(int1);
        addStreet(new HorizontalStreet(500, 200, 700));

        addTurn(new Turn(Corner.NE, 750, 200, 200, 50));
        addTurn(new Turn(Corner.SE, 750, 400 + Conf.distanceBeetweenStreets, Conf.distanceBeetweenStreets, 50));

        addStreet(new HorizontalStreet(50, 400, 700));

        addTurn(new Turn(Corner.NW, 10, 400, 200, 40));
        addTurn(new Turn(Corner.SW, 10, 600 + Conf.distanceBeetweenStreets, Conf.distanceBeetweenStreets, 40));

        addStreet(new HorizontalStreet(50, 600, 300));
        Intersection int2 = new Intersection(new VerticalStreet(380, 570, 670), new HorizontalStreet(300, 600, 500));
        addIntersection(int2);
        addStreet(new HorizontalStreet(500, 600, 800));

        EstablishedLights lights1 = new EstablishedLights();
        lights1.setTimeWE(14000);
        int1.setLights(lights1);

        EstablishedLights lights2 = new EstablishedLights();
        lights2.setTimeWE(14000);
        int2.setLights(lights2);
    }

}
